from datetime import timedelta


class BaseConfig(object):
    SECRET_KEY = 'devkey8888'
    SESSION_COOKIE_NAME = "flasklogin"  # session name
    BOOTSTRAP_BOOTSWATCH_THEME = 'lux'  # bootstrap主题方案
    # SQLALCHEMY_DATABASE_URI = 'postgresql://localhost/flask_login'  # postgresql数据库 旧psycopg2
    SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg://localhost/flask_login'  # postgresql数据库 新psycopg3

    # SQLALCHEMY_TRACK_MODIFICATIONS = False  # 关闭烦人的警告 新驱动貌似默认关掉了
    SQLALCHEMY_ECHO = True  # print转化后的sql语句
    PERMANENT_SESSION_LIFETIME = timedelta(hours=2)  # session过期
    # REMEMBER_COOKIE_DURATION = timedelta(seconds=2)
